//package com.topscomm.mpm.controller;
//
//import com.topscomm.basic.exception.ServiceException;
//import com.topscomm.mpm.service.impl.MigrateDataToLTCService;
//import com.topscomm.pub.vo.ResponseResult;
//import com.topscomm.tap.common.SessionUserBean;
//import com.topscomm.tap.threadlocal.ThreadLocalContext;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestParam;
//import org.springframework.web.bind.annotation.RestController;
//
//import java.util.Map;
//
///**
// * @description:迁移数据到LTC中
// * @author: chengengwei
// * @date: 2021-10-26
// * @modify:
// */
//@RestController
//@RequestMapping("mpm/migrateDataToLTC")
//public class MigrateDataToLTCController {
//
//	@Autowired
//	private MigrateDataToLTCService migrateDataToLTCService;
//
//	@GetMapping(value = "/migrate")
//	public ResponseResult<Object> migrate(@RequestParam(required = false) Map<String, Object> paraMap) {
//		try {
//			SessionUserBean sessionUserBean = ThreadLocalContext.sessionUserBeanThreadLocal.get();
//			if (sessionUserBean == null || sessionUserBean.getUser().getAdminlevel() != 9) {
//				throw new ServiceException("无权限调用");
//			}
//			this.migrateDataToLTCService.setDeptCommonCodeValue();
//			this.migrateDataToLTCService.setOldNewIdRelation();
//			this.migrateDataToLTCService.dealOldNewIdByRelation();
//			this.migrateDataToLTCService.insertRecordToLTC();
//			this.migrateDataToLTCService.dealCboItems();
//			this.migrateDataToLTCService.dealSysParam();
//			this.migrateDataToLTCService.dealCustomerInfo();
//			return ResponseResult.ok("成功");
//		} catch (Exception e) {
//			e.printStackTrace();
//			return ResponseResult.error(e.getMessage());
//		}
//	}
//}

